package com.example.jrcp;

import com.sun.deploy.util.StringUtils;

import java.util.*;

/**
 * @Author zhangxin
 * @Date 2022/8/25 17:51
 */
public class TestC {
    public static void main(String[] args) {
        List<String> list = new ArrayList();
        list.add("422100000020,422100000030,422100000050,422100000060,422100000090,422100000110,422100000100");
        list.add("422100000020,422100000030,422100000050,422100000060,422100000090,422100000110,422100000010,422100000070,422100000040,422100000080,422100000100");
        list.add("422100000140,422100000150,422100000160,422100000170,422100000180,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000150,422100000160,422100000170,422100000180,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000020,422100000030,422100000050,422100000060,422100000090,422100000010,422100000070,422100000080,422100000100,422100000040,422100000110");
        list.add("422100000090,422100000060,422100000100,422100000070,422100000110,422100000050,422100000010,422100000020,422100000030,422100000040,422100000080");
        list.add("422100000090,422100000060,422100000110");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000150,422100000160,422100000170,422100000180,422100000190");
        list.add("422100000040,422100000050,422100000070");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130,422100000140");
        list.add("422100000050,422100000070");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000120,422100000110,422100000130,422100000140");
        list.add("422100000010,422100000020,422100000030");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000150,422100000160,422100000170,422100000180,422100000200,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000010,422100000020,422100000030,422100000050,422100000060,422100000070,422100000120");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000060,422100000070,422100000080,422100000090,422100000100,422100000120,422100000050");
        list.add("422100000140,422100000150,422100000160,422100000170,422100000180,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000050,422100000060,422100000020,422100000030,422100000040,422100000090,422100000070,422100000010");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000150,422100000160,422100000170,422100000180,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000150,422100000160,422100000170,422100000180,422100000200,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000130,422100000120,422100000140,422100000150,422100000160,422100000170,422100000180,422100000200");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000120,422100000110,422100000130,422100000140");
        list.add("422100000140,422100000150,422100000160,422100000170,422100000180,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000150,422100000160,422100000170,422100000180,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000140,422100000150,422100000160,422100000170,422100000180,422100000200,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000190,422100000110,422100000120,422100000130");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000120,422100000110,422100000130,422100000140");
        list.add("422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000120,422100000110,422100000130,422100000140");
        list.add("422100000140,422100000010,422100000020,422100000030,422100000040,422100000050,422100000060,422100000070,422100000080,422100000090,422100000100,422100000110,422100000120,422100000130");
        list.add("422100000050,422100000010,422100000020,422100000030,422100000040,422100000060,422100000090,422100000070");
        list.add("422100000150,422100000160,422100000170,422100000180,422100000200,422100000190");
        //待处理字符串
        for (String s : list) {
            String out = getOut(s);
            System.out.println(out);
        }
    }

    public static String getOut(String s){
        JiHe4221 aa = new JiHe4221();
        String[] split = s.split(",");
        //最终集合
        Set<String> set = new HashSet();
        for (int i = 0; i < split.length; i++) {
            switch (split[i]){
                case "422100000010":
                    for (String s1 : aa.list422100000010) {
                        set.add(s1);
                    }
                    break;
                case "422100000020":
                    for (String s1 : aa.list422100000020) {
                        set.add(s1);
                    }break;
                case "422100000030":
                    for (String s1 : aa.list422100000030) {
                        set.add(s1);
                    }break;
                case "422100000040":
                    for (String s1 : aa.list422100000040) {
                        set.add(s1);
                    }break;
                case "422100000050":
                    for (String s1 : aa.list422100000050) {
                        set.add(s1);
                    }break;
                case "422100000060":
                    for (String s1 : aa.list422100000060) {
                        set.add(s1);
                    }break;
                case "422100000070":
                    for (String s1 : aa.list422100000070) {
                        set.add(s1);
                    }break;
                case "422100000080":
                    for (String s1 : aa.list422100000080) {
                        set.add(s1);
                    }break;
                case "422100000090":
                    for (String s1 : aa.list422100000090) {
                        set.add(s1);
                    }break;
                case "422100000100":
                    for (String s1 : aa.list422100000100) {
                        set.add(s1);
                    }break;
                case "422100000110":
                    for (String s1 : aa.list422100000110) {
                        set.add(s1);
                    }break;
                case "422100000120":
                    for (String s1 : aa.list422100000120) {
                        set.add(s1);
                    }break;
                case "422100000130":
                    for (String s1 : aa.list422100000130) {
                        set.add(s1);
                    }break;
                case "422100000140":
                    for (String s1 : aa.list422100000140) {
                        set.add(s1);
                    }break;
                case "422100000150":
                    for (String s1 : aa.list422100000150) {
                        set.add(s1);
                    }break;
                case "422100000160":
                    for (String s1 : aa.list422100000160) {
                        set.add(s1);
                    }break;
                case "422100000170":
                    for (String s1 : aa.list422100000170) {
                        set.add(s1);
                    }break;
                case "422100000180":
                    for (String s1 : aa.list422100000180) {
                        set.add(s1);
                    }break;
                case "422100000190":
                    for (String s1 : aa.list422100000190) {
                        set.add(s1);
                    }break;
                case "422100000200":
                    for (String s1 : aa.list422100000200) {
                        set.add(s1);
                    }break;
            }
        }
        List objects = Arrays.asList(set.toArray());
        Collections.sort(objects);
        String join = StringUtils.join(objects, ",");
        return join;
    }
}
